<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>文档管理系统-主页</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/themes/layui/css/layui.css">
  <script src="js/scripts/boot.js" type="text/javascript"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">平台名称</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:onSelfInfo();">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
	<%= session.getAttribute("nickName")%>
        </a>
      </li>
      <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/views/login.jsp">退出</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">所有功能</a>
          <dl class="layui-nav-child">
            <dd><a href="${pageContext.request.contextPath}/views/document/docList.jsp" target="option">项目文档管理</a></dd>  
            <dd><a href="${pageContext.request.contextPath}/views/document/userList.jsp" target="option">员工管理</a></dd>    
         </dl>
        </li>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div class="main_content">
    	<div id="page_content">
    		<iframe id="option" name="option" style="overflow: visible;" frameborder="no" width="100%" height="100%"></iframe>
    	</div>
    </div>
  </div>
  
<!--   <div class="layui-footer">
    底部固定区域
  </div> -->
</div>
<script src="${pageContext.request.contextPath}/themes/layui/layui.js"></script>
<script>
<%-- var userType = '<%= session.getAttribute("userType")%>';
 if(userType == 3) {//管理员
	$("dl").append('<dd><a href="${pageContext.request.contextPath}/views/document/userList.jsp" target="option">员工管理</a></dd>');
} --%>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;
  
});
mini.parse();
function onSelfInfo() {
	mini.open({
	    targetWindow: window,
	    url:"userInfo.jsp",
	    title: "文档信息添加", 
	    width: 330, height: 250,
	    onload: function () {
	        //var iframe = this.getIFrameEl();
	        //var data = { action: "new" };
	        //iframe.contentWindow.SetData(data);
	    },
	    ondestroy: function (action) {
	        grid.reload();
	    }
	});	
}
</script>
</body>
</html>
        